<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link href="${ctx }/css/reset.css" rel="stylesheet" type="text/css" />
		<link href="${ctx }/css/layout.css" rel="stylesheet" type="text/css" />
		<link href="${ctx }/css/style.css" rel="stylesheet" type="text/css" />
		<link href="${ctx }/css/other.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
		<script src="${ctx}/js/home.js" type="text/javascript"></script>
	</head>
	<body>
		<div class="header">
			<a href="${ctx}">
				<h1>
					market网上购物系统
				</h1> </a>
			<ul class="nav">
				<c:choose>
					<c:when test="${session.member==null}">
						<li class="red">
							<a href="javascript:void(0);" id="sl">登录</a>|
						</li>
						<li class="red">
							<a href="javascript:void(0);" id="reg">注册</a>|
						</li>
					</c:when>
					<c:otherwise>
						<li class="red">
							您好，
							<font color="red">${session.member.name}</font>，祝您购物愉快!
							<a href="${ctx}/member/member!logout"><font color="green">[注销]</font>
							</a>
						</li>
						<li>
							<a href="${ctx}/member/member!myAccount"><font color="green">我的账户</font>
							</a>
						</li>
					</c:otherwise>
				</c:choose>
				<li>
					<a href="${ctx}/member/shopcart/shop!getShopCartList">购物车</a>|
				</li>
				<li>
					<a href="mailto:slonghorn@163.com">联系管理员</a>|
				</li>
				<li>
					<a href="javaScript:sHP();">设置主页</a>|
				</li>
				<li>
					<a href="javaScript:aF();">收藏本站</a>
				</li>
			</ul>
			<div class="banner">
				<ul class="mainnav">
					<li class="${request.support==null?'current':''}">
						<a href="${ctx}">商城首页</a>
					</li>
					<li class="${request.support=='精品推荐'?'current':''}">
						<a href="${ctx}/pub/goods/goods!getGoodsListBySupport?type=jp">精品推荐</a>
					</li>
					<li class="${request.support=='特价商品'?'current':''}">
						<a href="${ctx}/pub/goods/goods!getGoodsListBySupport?type=dis">特价商品</a>
					</li>
					<li class="last_nav ${request.support=='热销商品'?'current':''}">
						<a href="${ctx}/pub/goods/goods!getGoodsListBySupport?type=hot">热销商品</a>
					</li>
				</ul>
				<div class="search">
					<form action="${ctx}/pub/goods/goods!searchGoods" method="post">
						<input type="text" name="goodInfo.goodsName" />
						<input type="submit" value="搜索" />
					</form>
				</div>
				<div class="ad"
					style="overflow: hidden; width: 960px; height: 257px;">
					<div style="">
						<a href="#" id="ad1"><img src="${ctx }/images/img_ad_01.jpg"
								alt="广告" /> </a>
					</div>
					<div style="display: none;">
						<a href="#" id="ad2"><img src="${ctx }/images/img_ad_02.jpg"
								alt="广告" /> </a>
					</div>
					<div style="display: none;">
						<a href="#" id="ad3"><img src="${ctx }/images/img_ad_03.jpg"
								alt="广告" /> </a>
					</div>
					<div style="display: none;">
						<a href="#" id="ad4"><img src="${ctx }/images/img_ad_04.jpg"
								alt="广告" /> </a>
					</div>
					<!--  <a href="#" id="ad2"><img src="../img/img_ad_01.jpg" alt="广告" /></a> 
            <a href="#" id="ad3"><img src="../img/img_ad_01.jpg" alt="广告" /></a> 
            <a href="#" id="ad4"><img src="../img/img_ad_01.jpg" alt="广告" /></a>-->
				</div>
				<ul class="num" id="tab">
					<li class="current" rel="0">
						1
					</li>
					<li rel="1">
						2
					</li>
					<li rel="2">
						3
					</li>
					<li rel="3">
						4
					</li>
				</ul>
			</div>
		</div>
		<c:if test="${session.member==null}">
			<div class="login" style="display: none; position: absolute;">
				<h3>
					用户登陆
				</h3>
				<form action="${ctx}/member/member!checkLogin" method="post">
					<p>
						<label>
							用户名：
						</label>
						<input type="text" name="member.name" value="test" />
					</p>
					<p>
						<label>
							密 码：
						</label>
						<input type="password" name="member.password" value="test" />
					</p>
					<p>
						<label>
							验证码：
						</label>
						<input type="text" name="code" style="width: 65px;" />
						<a href="javascript:void(0);"
							onclick="$(this,'img')[0].src='${ctx }/getcode.get'"> <img
								src="${ctx }/getcode.get" /> </a>
					</p>
					<p style="text-align: center;">
						<input type="submit" value="提交" />
						<input type="button" onclick="cancel();" value="取消" />
					</p>
				</form>
			</div>
			<div class="reg" style="display: none; position: absolute;">
				<h3>
					用户注册
				</h3>
				<form action="${ctx}/member/member!register" method="post">
					<p>
						<label>
							用户名：
						</label>
						<input type="text" name="member.name" />
					</p>
					<p>
						<label>
							密码：
						</label>
						<input type="password" name="member.password" />
					</p>
					<p>
						<label>
							确认密码：
						</label>
						<input type="password" name="member.password" />
					</p>
					<p>
						<label>
							性别：
						</label>
						<select name="member.sex">
							<option value="true">
								男
							</option>
							<option value=“false”>
								女
							</option>
						</select>
					</p>
					<p>
						<label>
							密码提示问题：
						</label>
						<input type="password" name="member.questions" />
					</p>
					<p>
						<label>
							答案：
						</label>
						<input type="password" name="member.answers" />
					</p>
					<p>
						<label>
							真实姓名：
						</label>
						<input type="password" name="member.trueName" />
					</p>
					<p>
						<label>
							手机：
						</label>
						<input type="password" name="member.mobile" />
					</p>
					<p>
						<label>
							座机：
						</label>
						<input type="password" name="member.phone" />
					</p>
					<p>
						<label>
							地址：
						</label>
						<input type="password" name="member.address" />
					</p>
					<p>
						<label>
							邮编：
						</label>
						<input type="password" name="member.postCode" />
					</p>
					<p>
						<label>
							邮编：
						</label>
						<input type="password" name="member.emails" />
					</p>
					<p style="text-align: center;">
						<input type="submit" value="提交" />
						<input type="button" onclick="cancel();" value="取消" />
					</p>
				</form>
			</div>
			<div id="back"
				style="filter: alpha(opacity = 50); background: rgb(0, 0, 0) none repeat scroll 0% 0%; position: absolute; z-index: 99; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; left: 0px; top: 0px; opacity: 0.5; display: none;"></div>
		</c:if>
	</body>
</html>